#ifndef DISPLAY_H
#define DISPLAY_H

#include "U8g2_for_TFT_eSPI.h"
#include <TJpg_Decoder.h>
#include <TimeLib.h>

#include "TimeUtil.h"
#include "WMHelper.h"
#include "Weather.h"
#include "SPIFFS.h"
//#include "List_SPIFFS.h"

#include "img/pangzi/i0.h"
#include "img/pangzi/i1.h"
#include "img/pangzi/i2.h"
#include "img/pangzi/i3.h"
#include "img/pangzi/i4.h"
#include "img/pangzi/i5.h"
#include "img/pangzi/i6.h"
#include "img/pangzi/i7.h"
#include "img/pangzi/i8.h"
#include "img/pangzi/i9.h"
#include "img/panda.h"

class Display
{
public:
    TFT_eSPI *tft;          // tft instance
    U8g2_for_TFT_eSPI *u8f; // U8g2 font instance
    void init(TFT_eSPI *tft_prarm, U8g2_for_TFT_eSPI *u8f_prarm);
    /**
     * 表盘
     */
    void setUpClock();
    /**
     * 显示天气
     */
    void setupWeather(WeatherData weatherData);
    /**
     * 显示太空人
     */
    void imgAnim();
    /**
     * 更新显示文字
     */
    void resetTextIndex();
    /**
     * 循环显示文字
     */
    void textLoop();

    /**
     * 显示图片
    */
    void displayPicture();
};
#endif // DISPLAY_H